//引入内置模块和express框架
let express = require('express');
let fs = require('fs');
let path = require('path');
//创建服务器
let app = express();
//引入暴露的方法
let rotuer = require('./index');
app.use(rotuer);


//设置端口
app.listen(1314, () => {
    console.log('开机！！！');
});
app.use(express.static(path.join(__dirname,'static')));